import java.net.*;
import java.io.*;
public class TCServer {
	public ServerSocket serversocket;
	private static final int port = 5002;
	public Socket socket ;
	
	public void TCServer (){
		
	}
	public void listenServer () throws IOException{
		serversocket = new ServerSocket(port);
		boolean working = true;
		while(working){
			socket = serversocket.accept();
			
			//socket.setSoTimeout(10000);
			TCServerThread dealMachine = new TCServerThread(socket);
			dealMachine.start();
		}
		
	}

}
